import React from "react";
import "./home.css";

import Nav from "./nav";
import { Switch, Link, Route, Redirect } from "react-router-dom";
import gsjj from "../compe/gsjj";
import glyd from "../compe/gltd";
import xiaomi from "../compe/xiaomi";
import Jr from "../compe/jr";
import Fz from "../compe/fz";
import gs from "../compe/gs";

class Home extends React.Component {
  render() {
    return (
      <div>
        <div className="home_box">
          <div>小米商城</div>
          <div>MIUI</div>
          <div>loT</div>
          <div>云服务</div>
          <div>天星科技</div>
          <div>有品</div>
          <div>小麦开放平台</div>
          <div>企业团购</div>
          <div>资质证照</div>
          <div>协议规则</div>
          <div>下载APP</div>
          <div>智能生活</div>
          <div>Select Location</div>
          <div
            onClick={() => {
              this.props.history.push("/login");
            }}
          >
            登录
          </div>
          <div
            onClick={() => {
              this.props.history.push("/Zhuce");
            }}
          >
            注册
          </div>
          <div>消息通知</div>
        </div>
        <Nav></Nav>

        <div className="swiper">
          <div className="top">
            <div>
              <Link to="/gsjj" style={{ textDecoration: "none" }}>
                公司简介
              </Link>
            </div>
            <div>
              <Link to="/glyd" style={{ textDecoration: "none" }}>
                管理团队
              </Link>
            </div>
            <div>
              <Link to="/xiaomi" style={{ textDecoration: "none" }}>
                小米文化
              </Link>
            </div>
            <div>
              <Link to="/fz" style={{ textDecoration: "none" }}>
                发展经历
              </Link>
            </div>
            <div>
              <Link to="/gs" style={{ textDecoration: "none" }}>
                小米新闻
              </Link>
            </div>
            <div>
              <Link to="/jr" style={{ textDecoration: "none" }}>
                加入小米
              </Link>
            </div>
          </div>
          <div className="bottom">
            <div className="nottom_nr">
              <Switch>
                <Route path="/gsjj" component={gsjj}></Route>
                <Route path="/glyd" component={glyd}></Route>
                <Route path="/xiaomi" component={xiaomi}></Route>
                <Route path="/jr" component={Jr}></Route>
                <Route path="/fz" component={Fz}></Route>
                <Route to="/gs" component={gs}></Route>
              </Switch>
            </div>
          </div>
        </div>
      </div>
    );
  }
}

export default Home;
